package com.longnows.appserver.dto;

import com.longnows.appserver.validators.PasswordEqual;
import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;

@Builder
@Setter
@Getter
@PasswordEqual(min = 1,message = "两次密码不同")
//@NoArgsConstructor
public class PersonDTO {

    @Length(min = 3,max = 10,message = "大于3小于10")
    private String name;
    private Integer age;

    private String password1;

    private String password2;

    @Valid
    private  SchoolDTO schoolDTO;
}
